Hierarchical Model Predictive Control Method of Wastewater Treatment Process based on Fuzzy Neural Network

ABSTRACT

A hierarchical model predictive control (HMPC) method based on fuzzy neural network for wastewater treatment process (WWTP) is designed to realize hierarchical control of dissolved oxygen (DO) concentration and nitrate nitrogen concentration. In view of the difference of time scales in WWTP, it is difficult to accurately control the concentration of DO and nitrate nitrogen. The disclosure establishes a HMPC structure according to different time scales. Then, the concentration of DO and nitrate nitrogen is controlled with different frequencies. It not only conforms to the operation characteristics of WWTP, but also solves the problem of poor operation performance of multivariable model predictive control. The experimental results show that the HMPC method can achieve accurate on-line control of DO concentration and nitrate nitrogen concentration with different time scales.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese application No.202011080017.4, filed on Oct. 10, 2020, the content of which is herebyincorporated by reference in its entirety.

Technology Area Since the control effect of DO concentration and nitratenitrogen concentration directly affects the effluent quality andoperation energy consumption of WWTP, the invention designs a FNN basedHMPC method of WWTP to realize the online hierarchical control of DOconcentration and nitrate nitrogen concentration. As an important partof WWTP, the control of DO concentration and nitrate nitrogenconcentration is an important branch of advanced manufacturingtechnology, which belongs to the field of intelligent control and watertreatment.

Technology Background Most countries and regions in the world are facinga serious shortage of water resources. Wastewater treatment is one ofthe important solutions to solve the shortage of water resources. It cannot only reduce the discharge of water pollutants, but also producerenewable water sources to maintain the balance of ecological andnatural material circulation.

The concentration of DO in aerobic zone of wastewater treatment unitdirectly affects the nitrification process. When the concentration of DOincreases, the concentration of ammonia nitrogen and total nitrogen inthe effluent will decrease, but when the concentration of DO reaches acertain value, the change range of ammonia nitrogen in the effluent willweaken. Nitrate concentration in anoxic zone of wastewater treatmentunit is an important index to measure the effect of denitrification,which reflects the process of denitrification. Controlling nitrateconcentration in a suitable range can improve the potential ofdenitrification. Therefore, it is very important to control theconcentration of DO and nitrate nitrogen in the wastewater treatmentunit. It is necessary to control the concentration of DO and nitratenitrogen in a certain range in order to improve the effluent quality.

However, due to the complexity of physical, chemical and biologicalphenomena associated with the WWTP, as well as the sudden change ofinflow flow, the control of WWTP is a very complex problem. Although thetraditional PID control or nonlinear model predictive control is awidely used control method at present, due to the different time scalesof the control variables in the WWTP, it may reduce the systemperformance and even destroy the stability of the closed-loop system.

The invention designs a HMPC method for WWTP based on FNN, and realizesonline hierarchical control of DO concentration and nitrate nitrogenconcentration in WWTP according to different time scales by constructinghierarchical model predictive control structure.

SUMMARY

Aiming at the DO concentration and nitrate nitrogen concentration aredifficult to accurately control caused by the characteristics of timescale difference in WWTP, the invention proposes a HMPC method for WWTPbased on FNN. According to different time scales, the control methodestablishes a hierarchical model predictive control structure, andcontrols the DO concentration and nitrate concentration according todifferent frequency. The invention solves the problem of poor operationperformance of current multivariable model predictive control, andeffectively improves the accuracy of online control of DO concentrationand nitrate nitrogen concentration;

The invention adopts the following technical scheme and implementationsteps:

1. A hierarchical model predictive control (HMPC) system of wastewatertreatment process (WWTP) based on fuzzy neural network (FNN) is proposedto solve the problem that control variables have different time scales.Then, the effect of wastewater treatment is improved by hierarchicalcontrol of dissolved oxygen (DO) concentration and nitrate nitrogenconcentration, comprising the following steps:

(1) The HMPC system for WWTP control comprising a set of measuring meansarranged to obtain a dataset, the dataset comprises a plurality ofprocess variables related to a parameter of WWTP; a programmable logiccontroller (PLC) arranged to perform D/A conversion and A/D conversion;a variable-frequency drive (VFD) arranged to control the aeration pumpand electronic valve by changing the working power frequency of motor; aHMPC module arranged to calculate the control law to track the DOconcentration and nitrate nitrogen concentration in WWTP with differenttime scales; the HMPC module comprising a hierarchical structure, inwhich each layer contains a FNN to predict the system output and anoptimization control module to calculate the control law;

(2) According to different time scales, the hierarchical controlstructure of HMPC module is designed to control the DO concentration andnitrate nitrogen concentration in WWTP:

The high-level controller consists of high-level FNN and high-levelmodel predictive controller, it takes the sampling period of nitratenitrogen concentration 2T as the time scale to track the set values ofnitrate nitrogen concentration and DO concentration, and calculates thehigh-level control law, t₁=2mT is the sampling time of nitrate nitrogenconcentration, and m is the sampling steps of nitrate nitrogenconcentration; The low-level controller consists of low-level FNN andlow-level model predictive controller, it takes the sampling period ofDO concentration T as the time scale to track the set values of DOconcentration and the control law calculated by high-level controller,and calculates the low-level control law, t₂=kT is the sampling time ofDO concentration, and k is the sampling steps of DO concentration;

(3) The high-level FNN is designed to predict the concentration ofnitrate nitrogen at each sampling time t₁, which is as follows:

1) Set q=1;

2) The input of the high-level FNN is x₁(t₁)=[y₁(t₁), u₂₁(t₁),u₂₂(t₁)]^(T), y₁(t₁)=[y₁(t₁−1), y₁(t₁−2)], u₂₁(t₁)=[u₂₁(t₂−5),u₂₁(t₂−6)], u₂₂(t₁)=[u₂₂(t₂−5), u₂₂(t₂−6)], y₁(t₁−1) is the actual valueof nitrate nitrogen concentration at t₁−1, y₁(t₁−2) is the actual valueof nitrate nitrogen concentration at t₁−2, u₂₁(t₂−5) is the aerationrate at t₂−5, u₂₁(t₂−6) is the aeration rate at t₂−6, u₂₂(t₂−5) is theinternal reflux in WWTP at t₂−5, u₂₂(t₂−6) is the internal reflux inWWTP at t₂−6, T is the transpose of matrix, the output of the high-levelFNN is the predicted value of nitrate nitrogen concentration ŷ₁(t₁) att₁, the output expression is as follows:

$\begin{matrix}{{{{\overset{\hat{}}{y}}_{1}\left( t_{1} \right)} = \frac{\sum_{j = 1}^{8}{{w_{hj}\left( t_{1} \right)}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{1i}{(t_{1})}} - {c_{hij}{(t_{1})}}})}^{2}}{2{\sigma_{hij}^{2}{(t_{1})}}}}}}}{\sum_{j = 1}^{8}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{1i}{(t_{1})}} - {c_{hij}{(t_{1})}}})}^{2}}{2{\sigma_{hij}^{2}{(t_{1})}}}}}}},} & (1)\end{matrix}$

where x_(1i)(t₁) is the ith input of the high-level FNN at t₁,w_(hj)(t₁) is the connection weight between the jth neuron in the rulelayer and the output neuron at t₁, j∈[1, 8], c_(hij)(t₁) is the centervalue of the jth radial basal neuron corresponding to the ith inputneuron at t₁, i∈[1, 6], σ_(hij)(t₁) is the center width of the ith inputneuron corresponding to the jth radial basal neuron at t₁, e=2.72, theparameter update rules are as follows:

w _(hj)(t _(i)+1)=w _(hj)(t ₁)−0.2∂E ₁(t ₁)/∂w _(hj)(t ₁),

c _(hij)(t ₁+1)=c _(hij)(t ₁)−0.2∂E ₁((t ₁)/∂c _(hij)(t ₁),

σ_(hij)(t ₁+1)=σ_(hij)(t ₁)−0.2∂E ₁(t ₁)/∂σ_(hij)(t ₁),  (2)

where w_(hj)(t₁+1) is the connection weight between the jth neuron inthe rule layer and the output neuron at t₁+1, c_(hij)(t₁+1) is thecenter value of the jth radial basal neuron corresponding to the ithinput neuron at t₁+1, σ_(hij)(t₁+1) is the center width of the ith inputneuron corresponding to the jth radial basal neuron at t₁+1,E₁(t₁)=½[y₁(t₁)−ŷ₁(t₁)]² is the error between the actual and predictednitrate nitrogen concentration at t₁;

3) Set q=q+1, if q≤20 is true, go to step 2), otherwise, exit the cycle;

(4) The low-level FNN is designed to predict the DO concentration ateach sampling time t₂, which is as follows:

I Set r=1;

II The input of the low-level FNN is x₂(t₂)=[y₂(t₂), u₂₁(t₂),u₂₂(t₂)]^(T), y₂(t₂)=[y₂(t₂−1), y₂(t₂−2)], u₂₁(t₂)=[u₂₁(t₂−5),u₂₁(t₂−6)], u₂₂(t₂)=[u₂₂(t₂−5), u₂₂(t₂−6)], y₂(t₂−1) is the actual valueof DO concentration at t₂−1, y₂(t₂−2) is the actual value of DOconcentration at t₂−2, the output of the low-level FNN if the predictedvalue of DO concentration y₂(t₂) at t₂, the output expression is asfollows:

$\begin{matrix}{{{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)} = \frac{\sum_{j = 1}^{8}{{w_{lj}\left( t_{2} \right)}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{2i}{(t_{2})}} - {c_{lij}{(t_{2})}}})}^{2}}{2{\sigma_{lij}^{2}{(t_{2})}}}}}}}{\sum_{j = 1}^{8}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{2i}{(t_{2})}} - {c_{lij}{(t_{2})}}})}^{2}}{2{\sigma_{lij}^{2}{(t_{2})}}}}}}},} & (3)\end{matrix}$

where x_(2i)(t₂) is the ith input of the low-level FNN at t₂, w_(lj)(t₂)is the connection weight between the jth neuron in the rule layer andthe output neuron at t₂, j∈[1, 8], c_(lij)(t₂) is the center value ofthe jth radial basal neuron corresponding to the ith input neuron at t₂,i∈[1, 6], σ_(lij)(t₂) is the center width of the ith input neuroncorresponding to the jth radial basal neuron at t₂, the parameter updaterules are as follows:

w _(lj)(t ₂+1)=w _(lj)(t ₂)−0.2∂E ₂(t ₂)/∂w _(lj)(t ₂),

c _(lij)(t ₂+1)=c _(lij)(t ₂)−0.2∂E ₂(t ₂)/∂c _(lij)(t ₂),

σ_(lij)(t ₂+1)=σ_(lij)(t ₂)−0.2∂E ₂(t ₂)/∂σ_(lij)(t ₂),  (4)

where w_(lj)(t₂+1) is the connection weight between the jth neuron inthe rule layer and the output neuron at t₂+1, c_(lij)(t₂+1) is thecenter value of the jth radial basal neuron corresponding to the ithinput neuron at t₂+1, σ_(lij)(t₂+1) is the center width of the ith inputneuron corresponding to the jth radial basal neuron at t₂+1,E₂(t₂)=½[y₂(t₂)−ŷ₂(t₂)]², is the error between the actual and predictedDO concentration at t₂;

III Set r=r+1, if r≤20 is true, go to step II, otherwise, exit thecycle;

(5) The optimization control module of HMPC module is designed asfollows:

{circle around (1)} Set k=0, m=0;

{circle around (2)} According to Eq.(1) and Eq.(3), the outputs of thehigh-level FNN ŷ₁(t₁) and the low-level FNN ŷ₂(t₂) are calculatedrespectively, ŷ₁(t₁)=[ŷ₁(t₁+1), ŷ₁(t₁+2), ŷ₁(t₁+5)]^(T),ŷ₂(t₂)=[ŷ₂(t₂+1), ŷ₂(t₂+2), . . . , ŷ₂(t₂+5)]^(T), ŷ₁(t₁+1) is thepredicted value of nitrate nitrogen concentration at t₁+1, ŷ₁(t₁+2) isthe predicted value of nitrate nitrogen concentration at t₁+2, ŷ₁(t₁+5)is the predicted value of nitrate nitrogen concentration at t₁+5,ŷ₂(t₂+1) is the predicted value of DO concentration at t₂+1, ŷ₂(t₂+2) isthe predicted value of DO concentration at t₂+2, ŷ₂(t₂+5) is thepredicted value of DO concentration at t₂+5;

{circle around (3)} The objective function of high-level MPC is designedto track the set value of nitrate nitrogen concentration and DOconcentration, and the high-level law at t₁ is calculated:

J ₁(t ₁)=λ₁[α₁ e _(p1)(t ₁)+ρ₁ Δu ₁(t ₁)^(T) Δu ₁(t ₁)]+λ₂[α₂ e _(p2)(t₂)^(T) e _(p2)(t ₂)+ρ₂ Δu ₁(t ₁)^(T) Δu ₁(t ₁)],   (5)

where e_(p1)(t₁)=r₁(t₁)−ŷ₁(t₁) is the error vector between the set valueof nitrate nitrogen concentration at t₁ and the predicted value ofnitrate nitrogen concentration, e_(p1)(t₁)=[e_(p1)(t₁+1), e_(p1)(t₁+2),. . . , e_(p1)(t₁+5)]^(T), r₁(t₁)=[r₁(t₁+1), r₁(t₁+2), . . . ,r₁(t₁+5)]^(T), e_(p1)(t₁+1) is the error between the set value ofnitrate nitrogen concentration and the predicted value of nitratenitrogen concentration at t₁+1, e_(p1)(t₁+2) is the error between theset value of nitrate nitrogen concentration and the predicted value ofnitrate nitrogen concentration at t₁+2, e_(p1)(t₁+5) is the errorbetween the set value of nitrate nitrogen concentration and thepredicted value of nitrate nitrogen concentration at t₁+5, r₁(t₁+1) isthe set value of nitrate nitrogen concentration at t₁+1, r₁(t₁+2) is theset value of nitrate nitrogen concentration at t₁+2, r₁(t₁+5) is the setvalue of nitrate nitrogen concentration at t₁+5,e_(p2)(t₂)=r₂(t₂)−ŷ₂(t₂) is the error vector between the set value of DOconcentration at t₂ and the predicted value of DO concentration,e_(p2)(t₂)=[e_(p2)(t₂+1), e_(p2)(t₂+2), e_(p2)(t₂+5)]^(T),r₂(t₂)=[r₂(t₂+1), r₂(t₂+2), . . . , r₂(t₂+5)]^(T), e_(p2)(t₂+1) is theerror between the set value of DO concentration and the predicted valueof DO concentration at t₂+1, e_(p2)(t₂+2) is the error between the setvalue of DO concentration and the predicted value of DO concentration att₂+2, e_(p2)(t₂+5) is the error between the set value of DOconcentration and the predicted value of DO concentration at t₂+5,r₂(t₂+1) is the set value of DO concentration at t₂+1, r₂(t₂+2) is theset value of DO concentration at t₂+2, r₂(t₂+5) is the set value of DOconcentration at t₂+5, Δu₁(t₁)=[Δu₁₁(t₁), Δu₁₂(t₁)]^(T) is the controlvector adjustment amount at t₁, Δu₁₁(t₁) is the adjustment amount ofblower aeration at t₁, Δu₁₂(t₁) is the adjustment amount of internalreflux at t₁, λ₁=0.5, λ₂=0.5 are weight parameters, α₁=30, ρ₁=10,α₂=0.5, ρ₂=0.5 are control parameters, where

Δu ₁(t ₁)=u ₁(t ₁+1)−u ₁(t ₁),

∥Δu ₁(t ₁)|≤Δu _(max),  (6)

u₁(t₁)=[u₁₁(t₁), u₁₂(t₁)]^(T) is the control vector at t₁, u₁₁(t₁) isthe aeration rate of the blower at t₁, u₁₂(t₁) is the internal reflux att₁, u₁(t₁+1)=[u₁₁(t₁+1), u₁₂(t₁+1)]^(T) is the control vector at t₁+1,u₁₁(t₁+1) is the aeration rate of the blower at t₁+1, u₁₂(t₁+1) is theinternal reflux flow at t₁+1, Δu_(max)=[ΔK_(L)a_(max), ΔQ_(amax)]^(T) isthe maximum adjustment vector allowed by the controller, ΔK_(L)a_(max)is the maximum aeration adjustment amount, ΔQ_(amax) is the maximuminternal reflux adjustment amount, Δu_(max) is set through the blowerand internal reflux valve in the control system equipment;

The aeration rate and internal reflux adjustment vector of thehigh-level MPC are calculated by minimizing Eq.(5):

$\begin{matrix}{{{\Delta{u_{1}\left( t_{1} \right)}} = {\eta_{1}\left( {{{\xi_{1}\left( \frac{\partial{{\overset{\hat{}}{y}}_{1}\left( t_{1} \right)}}{\partial{u_{1}\left( t_{1} \right)}} \right)}^{T}{e_{p1}\left( t_{1} \right)}} + {{\xi_{2}\left( \frac{\partial{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)}}{\partial{u_{1}\left( t_{1} \right)}} \right)}^{T}{e_{p2}\left( t_{2} \right)}}} \right)}},} & (7)\end{matrix}$

where η₁=0.8, ξ₁=3, ξ₂=1 are control parameters to adjust the aerationrate and internal reflux at t₁:

u ₁(t ₁+1)=u ₁(t ₁)+Δu ₁(t ₁),  (8)

{circle around (4)} The objective function of the low-level MPC isdesigned to track the concentration of DO and the control law calculatedby high-level controller, and the low-level control law is calculated att₂;

J ₂(t ₂)=γ₁ e _(p2)(t ₂)²+γ₂[u ₂₂(t ₂)−u ₁₂(t ₁)]²+γ₃ Δu ₂(t ₂)^(T) Δu₂(t ₂),  (9)

where u₂₂(t₂) is the internal reflux of the low-level MPC at t₂, u₁₂(t₁)is the internal reflux calculated by the high-level controller at t₁,Δu₂(t₂)=[Δu₂₁(t₂), Δu₂₂(t₂)]^(T) is the control vector adjustment amountat t₂, Δu₂₁(t₂) is the blower aeration adjustment amount at t₂, Δu₂₂(t₂)is the internal reflux adjustment amount at t₂, γ₁=30, γ₂=10, γ₃=1 arecontrol parameters, where

Δu ₂(t ₂)=u ₂(t ₂+1)−u ₂(t ₂),

|Δu ₂(t ₂)|≤Δu _(max),  (10)

where u₂(t₂)=[u₂₁(t₂), u₂₂(t₂)]^(T) is the control vector at t₂, u₂₁(t₂)is the aeration rate of the blower at t₂, u₂₂(t₂) is the internal refluxflow at t₂, u₂(t₂+1)=[u₂ (t₂+1), u₂₂(t₂+1)]^(T) is the control vector att₂+1, u₂₁(t₂+1) is the aeration rate of the blower at t₂+1, u₂₁(t₂+1) isthe internal reflux flow at t₂+1;

The aeration rate and internal reflux adjustment vector of the low-levelMPC are calculated by minimizing Eq.(9):

$\begin{matrix}{{{\Delta{u_{2}\left( t_{2} \right)}} = {\eta_{2}\left\lbrack {{{\gamma_{1}\left( \frac{\partial{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)}}{\partial{u_{2}\left( t_{2} \right)}} \right)}^{T}{e_{p2}\left( t_{2} \right)}} - {{\gamma_{2}\left( \frac{\partial{u_{22}\left( t_{2} \right)}}{\partial{u_{2}\left( t_{2} \right)}} \right)}^{T}\left( {{u_{22}\left( t_{2} \right)} - {u_{12}\left( t_{1} \right)}} \right)}} \right\rbrack}},} & (11)\end{matrix}$

where η₂=8.4 is control parameter to adjust the aeration rate andinternal reflux at t₂:

u ₂(t ₂+1)=u ₂(t ₂)+Δu ₂(t ₂),  (12)

{circle around (5)} Set k=k+1, if k=2(m+1) is true, set m=m+1 and go tostep {circle around (2)}, otherwise, go to step {circle around (6)};

{circle around (6)} If k≤200 is true, calculate the output of thelow-level FNN ŷ₂(t₂)=[ŷ₂(t₂+1), ŷ₂(t₂+2), . . . , ŷ₂(t₂+5)]^(T) byEq.(3), and go to step {circle around (4)}, otherwise, end the cycle;

(6) The concentration of nitrate nitrogen and DO is controlled by u₂(t₂)solved by the low-level controller, u₂(t₂)=[u₂₁(t₂), u₂₂(t₂)]^(T) is theinput of inverter and sensor at t₂, the inverter controls the blower byadjusting the speed of motor, and the sensor controls the valve byadjusting the opening of instrument, then, the aeration rate andinternal reflux are controlled, the output of the system is the actualvalue of nitrate nitrogen concentration and DO concentration.

The Novelties of this Patent Contain:

(1) To deal with the strong nonlinearity of WWTP, two FNNs are designedto model the concentration of DO and nitrate nitrogen, which solves theproblem that the nonlinear system is difficult to model.

(2) Aiming at the problem that the control variables of WWTP havedifferent time scales, a hierarchical model predictive control structureis established to control the concentration of DO and nitrate nitrogenaccording to different frequency.

(3) Due to the strong coupling of WWTP, the relationship between thehigh-level controller and the low-level controller is established. Thelow-level controller tracks the DO concentration and the control lawcalculated by the high-level controller.

(4) The invention designs a hierarchical optimization algorithm to solvethe above hierarchical optimization problems, so as to calculate thecontrol law.

(5) The hierarchical model predictive control method based on FNNproposed in this invention has the characteristics of high precision,low energy consumption, strong stability, etc.

Attention: for convenience of description, the invention only adopt thecontrol of DO concentration and nitrate nitrogen concentration. Theinvention can also be used for the control of ammonia nitrogen in WWTP,etc. As long as the principle of the invention is adopted for control,it shall be the scope of the invention.

DESCRIPTION OF DRAWINGS

FIG. 1 is diagram of the HMPC system of WWTP.

FIG. 2 is a control structure diagram of the invention.

FIG. 3 is the result diagram of the DO concentration control in thisinvention.

FIG. 4 is the error diagram of the DO concentration control result inthis invention.

FIG. 5 is the result diagram of nitrate nitrogen concentration controlin this invention.

FIG. 6 is the error diagram of the nitrate nitrogen concentrationcontrol result in this invention.

DETAILED DESCRIPTION OF THE INVENTION

1. A hierarchical model predictive control (HMPC) system of wastewatertreatment process (WWTP) based on fuzzy neural network (FNN) is proposedto solve the problem that control variables have different time scales.Then, the effect of wastewater treatment is improved by hierarchicalcontrol of dissolved oxygen (DO) concentration and nitrate nitrogenconcentration, comprising the following steps:

(1) The HMPC system for WWTP control comprising a set of measuring meansarranged to obtain a dataset, the dataset comprises a plurality ofprocess variables related to a parameter of WWTP; a programmable logiccontroller (PLC) arranged to perform D/A conversion and A/D conversion;a variable-frequency drive (VFD) arranged to control the aeration pumpand electronic valve by changing the working power frequency of motor; aHMPC module arranged to calculate the control law to track the DOconcentration and nitrate nitrogen concentration in WWTP with differenttime scales; the HMPC module comprising a hierarchical structure, inwhich each layer contains a FNN to predict the system output and anoptimization control module to calculate the control law;

(2) According to different time scales, the hierarchical controlstructure of HMPC module is designed to control the DO concentration andnitrate nitrogen concentration in WWTP:

The high-level controller consists of high-level FNN and high-levelmodel predictive controller, it takes the sampling period of nitratenitrogen concentration 2T as the time scale to track the set values ofnitrate nitrogen concentration and DO concentration, and calculates thehigh-level control law, t₁=2mT is the sampling time of nitrate nitrogenconcentration, and m is the sampling steps of nitrate nitrogenconcentration;

The low-level controller consists of low-level FNN and low-level modelpredictive controller, it takes the sampling period of DO concentrationT as the time scale to track the set values of DO concentration and thecontrol law calculated by high-level controller, and calculates thelow-level control law, t₂=kT is the sampling time of DO concentration,and k is the sampling steps of DO concentration;

(3) The high-level FNN is designed to predict the concentration ofnitrate nitrogen at each sampling time t₁, which is as follows:

1) Set q=1;

2) The input of the high-level FNN is x₁(t₁)=[y₁(t₁), u₂₁(t₁),u₂₂(t₁)]^(T), y₁(t₁)=[y₁(t₁−1), y₁(t₁−2)], u₂₁(t₁)=[u₂₁(t₂−5),u₂₁(t₂−6)], u₂₂(t₁)=[u₂₂(t₂−5), u₂₂(t₂−6)], y₁(t₁−1) is the actual valueof nitrate nitrogen concentration at t₁−1, y₁(t₁−2) is the actual valueof nitrate nitrogen concentration at t₁−2, u₂₁(t₂−5) is the aerationrate at t₂−5, u₂₁(t₂−6) is the aeration rate at t₂−6, u₂₂(t₂−5) is theinternal reflux in WWTP at t₂−5, u₂₂(t₂−6) is the internal reflux inWWTP at t₂−6, T is the transpose of matrix, the output of the high-levelFNN is the predicted value of nitrate nitrogen concentration ŷ₁(t₁) att₁, the output expression is as follows:

$\begin{matrix}{{{{\overset{\hat{}}{y}}_{1}\left( t_{1} \right)} = \frac{\sum_{j = 1}^{8}{{w_{hj}\left( t_{1} \right)}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{1i}{(t_{1})}} - {c_{hij}{(t_{1})}}})}^{2}}{2{\sigma_{hij}^{2}{(t_{1})}}}}}}}{\sum_{j = 1}^{8}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{1i}{(t_{1})}} - {c_{hij}{(t_{1})}}})}^{2}}{2{\sigma_{hij}^{2}{(t_{1})}}}}}}},} & (13)\end{matrix}$

where x_(1i)(t₁) is the ith input of the high-level FNN at t₁,w_(hj)(t₁) is the connection weight between the jth neuron in the rulelayer and the output neuron at t₁, j∈[1, 8], c_(hij)(t₁) is the centervalue of the jth radial basal neuron corresponding to the ith inputneuron at t₁, i∈[1, 6], σ_(hij)(t₁) is the center width of the ith inputneuron corresponding to the jth radial basal neuron at t₁, e=2.72, theparameter update rules are as follows:

w _(hj)(t ₁+1)=w _(hj)(t ₁)−0.2∂E ₁(t ₁)/∂w _(hj)(t ₁),

c _(hij)(t ₁+1)=c _(hij)(t ₁)−0.2∂E ₁(t ₁)/∂c _(hij)(t ₁),

σ_(hij)(t ₁+1)=σ_(hij)(t ₁)−0.2∂E ₁(t ₁)/∂σ_(hij)(t ₁)  (14)

where w_(hj)(t₁+1) is the connection weight between the jth neuron inthe rule layer and the output neuron at t₁+1, c_(hij)(t₁+1) is thecenter value of the jth radial basal neuron corresponding to the ithinput neuron at t₁+1, σ_(hij)(t₁+1) is the center width of the ith inputneuron corresponding to the jth radial basal neuron at t₁+1,E₁(t₁)=½[y₁(t₁)−ŷ₁(t₁)]² is the error between the actual and predictednitrate nitrogen concentration at t₁;

3) Set q=q+1, if q≤20 is true, go to step 2), otherwise, exit the cycle;

(4) The low-level FNN is designed to predict the DO concentration ateach sampling time t₂, which is as follows:

I Set r=1;

II The input of the low-level FNN is x₂(t₂)=[y₂(t₂), u₂₁(t₂),u₂₂(t₂)]^(T), y₂(t₂)=[y₂(t₂−1), y₂(t₂−2)], u₂₁(t₂)=[u₂₁(t₂−5),u₂₁(t₂−6)], u₂₂(t₂)=[u₂₂(t₂−5), u₂₂(t₂−6)], y₂(t₂−1) is the actual valueof DO concentration at t₂−1, y₂(t₂−2) is the actual value of DOconcentration at t₂−2, the output of the low-level FNN if the predictedvalue of DO concentration ŷ₂(t₂) at t₂, the output expression is asfollows:

$\begin{matrix}{{{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)} = \frac{\sum_{j = 1}^{8}{{w_{lj}\left( t_{2} \right)}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{2i}{(t_{2})}} - {c_{lij}{(t_{2})}}})}^{2}}{2{\sigma_{lij}^{2}{(t_{2})}}}}}}}{\sum_{j = 1}^{8}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{2i}{(t_{2})}} - {c_{lij}{(t_{2})}}})}^{2}}{2{\sigma_{lij}^{2}{(t_{2})}}}}}}},} & (15)\end{matrix}$

where x_(2i)(t₂) is the ith input of the low-level FNN at t₂, w_(lj)(t₂)is the connection weight between the jth neuron in the rule layer andthe output neuron at t₂, j∈[1, 8], c_(lij)(t₂) is the center value ofthe jth radial basal neuron corresponding to the ith input neuron at t₂,i∈[1, 6], σ_(lij)(t₂) is the center width of the ith input neuroncorresponding to the jth radial basal neuron at t₂, the parameter updaterules are as follows:

w _(lj)(t ₂+1)=w _(lj)(t ₂)−0.2∂E ₂(t ₂)/∂w _(lj)(t ₂),

c _(lij)(t ₂+1)=c _(lij)(t ₂)−0.2∂E ₂(t ₂)/∂c _(lij)(t ₂),

σ_(lij)(t ₂+1)=σ_(lij)(t ₂)−0.2∂E ₂(t ₂)/∂σ_(lij)(t ₂),  (16)

where w_(lj)(t₂+1) is the connection weight between the jth neuron inthe rule layer and the output neuron at t₂+1, c_(lij)(t₂+1) is thecenter value of the jth radial basal neuron corresponding to the ithinput neuron at t₂+1, σ_(lij)(t₂+1) is the center width of the ith inputneuron corresponding to the jth radial basal neuron at t₂+1,E₂(t₂)=½[y₂(t₂)−ŷ₂(t₂)]², is the error between the actual and predictedDO concentration at t₂;

III Set r=r+1, if r≤20 is true, go to step II, otherwise, exit thecycle;

(5) The optimization control module of HMPC module is designed asfollows:

{circle around (1)} Set k=0, m=0;

{circle around (2)} According to Eq.(1) and Eq.(3), the outputs of thehigh-level FNN ŷ₁(t₁) and the low-level FNN ŷ₂(t₂) are calculatedrespectively, ŷ₁(t₁)=[ŷ₁(t₁+1), ŷ₁(t₁+2), . . . , ŷ₁(t₁+5)]^(T),ŷ₂(t₂)=[ŷ₂(t₂+1), ŷ₂(t₂+2), . . . , ŷ₂(t₂+5)]^(T), ŷ₁(t₁+1) is thepredicted value of nitrate nitrogen concentration at t₁+1, ŷ₁(t₁+2) isthe predicted value of nitrate nitrogen concentration at t₁+2, ŷ₁(t₁+5)is the predicted value of nitrate nitrogen concentration at t₁+5,ŷ₂(t₂+1) is the predicted value of DO concentration at t₂+1, ŷ₂(t₂+2) isthe predicted value of DO concentration at t₂+2, ŷ₂(t₂+5) is thepredicted value of DO concentration at t₂+5;

{circle around (3)} The objective function of high-level MPC is designedto track the set value of nitrate nitrogen concentration and DOconcentration, and the high-level law at t₁ is calculated:

J ₁(t ₁)=λ₁[α₁ e _(p1)(t ₁)^(T) e _(p1)(t ₁)+ρ₁ Δu ₁(t ₁)^(T) Δu ₁(t₁)]+λ₂[α₂ e _(p2)(t ₂)^(T) e _(p2)(t ₂)+ρ₂ Δu ₁(t ₁)^(T) Δu ₁(t ₁)],  (17)

where e_(p1)(t₁)=r₁(t₁)−ŷ₁(t₁) is the error vector between the set valueof nitrate nitrogen concentration at t₁ and the predicted value ofnitrate nitrogen concentration, e_(p1)(t₁)=[e_(p1)(t₁+1), e_(p1)(t₁+2),. . . , e_(p1)(t₁+5)]^(T), r₁(t₁)=[r₁(t₁+1), r₁(t₁+2), . . . ,r₁(t₁+5)]^(T), e_(p1)(t₁+1) is the error between the set value ofnitrate nitrogen concentration and the predicted value of nitratenitrogen concentration at t₁+1, e_(p1)(t₁+2) is the error between theset value of nitrate nitrogen concentration and the predicted value ofnitrate nitrogen concentration at t₁+2, e_(p1)(t₁+5) is the errorbetween the set value of nitrate nitrogen concentration and thepredicted value of nitrate nitrogen concentration at t₁+5, r₁(t₁+1) isthe set value of nitrate nitrogen concentration at t₁+1, r₁(t₁+2) is theset value of nitrate nitrogen concentration at t₁+2, r₁(t₁+5) is the setvalue of nitrate nitrogen concentration at t₁+5,e_(p2)(t₂)=r₂(t₂)−ŷ₂(t₂) is the error vector between the set value of DOconcentration at t₂ and the predicted value of DO concentration,e_(p2)(t₂)=[e_(p2)(t₂+1), e_(p2)(t₂+2), . . . , e_(p2)(t₂+5)]^(T),r₂(t₂)=[r₂(t₂+1), r₂(t₂+2), . . . , r₂(t₂+5)]^(T), e_(p2)(t₂+1) is theerror between the set value of DO concentration and the predicted valueof DO concentration at t₂+1, e_(p2)(t₂+2) is the error between the setvalue of DO concentration and the predicted value of DO concentration att₂+2, e_(p2)(t₂+5) is the error between the set value of DOconcentration and the predicted value of DO concentration at t₂+5,r₂(t₂+1) is the set value of DO concentration at t₂+1, r₂(t₂+2) is theset value of DO concentration at t₂+2, r₂(t₂+5) is the set value of DOconcentration at t₂+5, Δu₁(t₁)=[Δu₁₁(t₁), Δu₁₂(t₁)]^(T) is the controlvector adjustment amount at t₁, Δu₁₁(t₁) is the adjustment amount ofblower aeration at t₁, Δu₁₂(t₁) is the adjustment amount of internalreflux at t₁, λ₁=0.5, λ₂=0.5 are weight parameters, α₁=30, ρ₁=10,α₂=0.5, ρ₂=0.5 are control parameters, where

Δu ₁(t ₁)=u ₁(t ₁+1)−u ₁(t ₁),

|Δu ₁(t ₁)|≤Δu _(max),  (18)

u₁(t₁)=[u₁₁(t₁), u₁₂(t₁)]^(T) is the control vector at t₁, u₁₁(t₁) isthe aeration rate of the blower at t₁, u₁₂(t₁) is the internal reflux att₁, u₁(t₁+1)=[u₁₁(t₁+1), u₁₂(t₁+1)]^(T) is the control vector at t₁+1,u₁₁(t₁+1) is the aeration rate of the blower at t₁+1, u₁₂(t₁+1) is theinternal reflux flow at t₁+1, Δu_(max)=[ΔK_(L)a_(max), ΔQ_(amax)]^(T) isthe maximum adjustment vector allowed by the controller, ΔK_(L)a_(max)is the maximum aeration adjustment amount, ΔQ_(amax) is the maximuminternal reflux adjustment amount, Δu_(max) is set through the blowerand internal reflux valve in the control system equipment;

The aeration rate and internal reflux adjustment vector of thehigh-level MPC are calculated by minimizing Eq.(5):

$\begin{matrix}{{{\Delta{u_{1}\left( t_{1} \right)}} = {\eta_{1}\left( {{{\xi_{1}\left( \frac{\partial{{\overset{\hat{}}{y}}_{1}\left( t_{1} \right)}}{\partial{u_{1}\left( t_{1} \right)}} \right)}^{T}{e_{p1}\left( t_{1} \right)}} + {{\xi_{2}\left( \frac{\partial{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)}}{\partial{u_{1}\left( t_{1} \right)}} \right)}^{T}{e_{p2}\left( t_{2} \right)}}} \right)}},} & (19)\end{matrix}$

where η₁=0.8, ξ₁=3, ξ₂=1 are control parameters to adjust the aerationrate and internal reflux at t₁:

u ₁(t ₁+1)=u ₁(t ₁)+Δu ₁(t ₁),  (20)

{circle around (4)} The objective function of the low-level MPC isdesigned to track the concentration of DO and the control law calculatedby high-level controller, and the low-level control law is calculated att₂;

J ₂(t ₂)=γ₁ e _(p2)(t ₂)²+γ₂[u ₂₂(t ₂)−u ₁₂(t ₁)]²+γ₃ Δu ₂(t ₂)^(T) Δu₂(t ₂),  (21)

where u₂₂(t₂) is the internal reflux of the low-level MPC at t₂, u₁₂(t₁)is the internal reflux calculated by the high-level controller at t₁,Δu₂(t₂)=[Δu₂₁(t₂), Δu₂₂(t₂)]^(T) is the control vector adjustment amountat t₂, Δu₂₁(t₂) is the blower aeration adjustment amount at t₂, Δu₂₂(t₂)is the internal reflux adjustment amount at t₂, γ₁=30, γ₂=10, γ₃=1 arecontrol parameters, where

Δu ₂(t ₂)=u ₂(t ₂+1)−u ₂(t ₂),

|Δu ₂(t ₂)|≤Δu _(max),  (22)

where u₂(t₂)=[u₂₁(t₂), u₂₂(t₂)]^(T) is the control vector at t₂, u₂₁(t₂)is the aeration rate of the blower at t₂, u₂₂(t₂) is the internal refluxflow at t₂, u₂(t₂+1)=[u₂₁(t₂+1), u₂₂(t₂+1)]^(T) is the control vector att₂+1, u₂₁(t₂+1) is the aeration rate of the blower at t₂+1, u₂₁(t₂+1) isthe internal reflux flow at t₂+1;

The aeration rate and internal reflux adjustment vector of the low-levelMPC are calculated by minimizing Eq.(9):

$\begin{matrix}{{{\Delta{u_{2}\left( t_{2} \right)}} = {\eta_{2}\left\lbrack {{{\gamma_{1}\left( \frac{\partial{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)}}{\partial{u_{2}\left( t_{2} \right)}} \right)}^{T}{e_{p2}\left( t_{2} \right)}} - {{\gamma_{2}\left( \frac{\partial{u_{22}\left( t_{2} \right)}}{\partial{u_{2}\left( t_{2} \right)}} \right)}^{T}\left( {{u_{22}\left( t_{2} \right)} - {u_{12}\left( t_{1} \right)}} \right)}} \right\rbrack}},} & (23)\end{matrix}$

where η₂=8.4 is control parameter to adjust the aeration rate andinternal reflux at t₂:

u ₂(t ₂+1)=u ₂(t ₂)+Δu ₂(t ₂),  (24)

{circle around (5)} Set k=k+1, if k=2(m+1) is true, set m=m+1 and go tostep {circle around (2)}, otherwise, go to step {circle around (6)};

{circle around (6)} If k≤200 is true, calculate the output of thelow-level FNN ŷ₂(t₂)=[ŷ₂(t₂+1), ŷ₂(t₂+2), . . . , ŷ₂(t₂+5)]^(T) byEq.(3), and go to step {circle around (4)}, otherwise, end the cycle;

(6) The concentration of nitrate nitrogen and DO is controlled by u₂(t₂)solved by the low-level controller, u₂(t₂)=[u₂₁(t₂), u₂₂(t₂)]^(T) is theinput of inverter and sensor at t₂, the inverter controls the blower byadjusting the speed of motor, and the sensor controls the valve byadjusting the opening of instrument, then, the aeration rate andinternal reflux are controlled, the output of the system is the actualvalue of nitrate nitrogen concentration and DO concentration. FIG. 3shows the DO concentration of the system, X-axis: time, unit: day,Y-axis: DO concentration, unit: mg/L, the solid line is the expected DOconcentration, the dotted line is the actual DO concentration; the errorbetween the actual output DO concentration and the expected DOconcentration is shown in FIG. 4, X-axis: time, unit: day, Y-axis: DOconcentration error, unit: mg/L FIG. 5 shows the nitrate concentrationvalue of the system, X-axis: time, unit: day, Y-axis: nitrateconcentration value, unit: mg/L, solid line is expected nitrateconcentration value, dotted line is actual nitrate concentration value;the error between actual output nitrate concentration and expectednitrate concentration is shown in FIG. 6, X-axis: time, unit: day,Y-axis: nitrate concentration error value, unit: mg/L. The results showthat the method is effective.

What is claimed is:
 1. A hierarchical model predictive control (HMPC)method of wastewater treatment process (WWTP) based on fuzzy neuralnetwork (FNN), comprising the following steps: (1) according todifferent time scales, a hierarchical control structure of HMPC moduleis designed to control dissolved oxygen (DO) concentration and nitratenitrogen concentration in WWTP: a high-level controller compriseshigh-level FNN and high-level model predictive controller, samplingperiod of nitrate nitrogen concentration 2T being taken as time scale totrack set values of nitrate nitrogen concentration and DO concentration,and calculates a high-level control law, t₁=2mT is a sampling time ofnitrate nitrogen concentration, and m is sampling steps of nitratenitrogen concentration; a low-level controller comprises low-level FNNand low-level model predictive controller, sampling period of DOconcentration T being taken as time scale to track set values of DOconcentration and the high-level control law calculated by thehigh-level controller, and calculates a low-level control law, t₂=kT issampling time of DO concentration, and k is sampling steps of DOconcentration; (3) the high-level FNN is designed to predict aconcentration of nitrate nitrogen at each sampling time t₁, which is asfollows: 1) set q=1; 2) an input of the high-level FNN isx₁(t₁)=[y₁(t₁), u₂₁(t₁), u₂₂(t₁)]^(T), y₁(t₁)=[y₁(t₁−1), y₁(t₁−2)],t₂₁(t₁)=[u₂₁(t₂−5), u₂₁(t₂−6)], u₂₂(t₁)=[u₂₂(t₂−5), u₂₂(t₂−6)], y₁(t₁−1)is an actual value of nitrate nitrogen concentration at t₁−1, y₁(t₁−2)is an actual value of nitrate nitrogen concentration at t₁−2, u₂₁(t₂−5)is an aeration rate at t₂−5, u₂₁(t₂−6) is an aeration rate at t₂−6,u₂₂(t₂−5) is an internal reflux in WWTP at t₂−5, u₂₂(t₂−6) is aninternal reflux in WWTP at t₂−6, T is a transpose of matrix, an outputof the high-level FNN is a predicted value of nitrate nitrogenconcentration ŷ₁(t₁) at t₁, an output expression is as follows:$\begin{matrix}{{{{\overset{\hat{}}{y}}_{1}\left( t_{1} \right)} = \frac{\sum_{j = 1}^{8}{{w_{hj}\left( t_{1} \right)}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{1i}{(t_{1})}} - {c_{hij}{(t_{1})}}})}^{2}}{2{\sigma_{hij}^{2}{(t_{1})}}}}}}}{\sum_{j = 1}^{8}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{1i}{(t_{1})}} - {c_{hij}{(t_{1})}}})}^{2}}{2{\sigma_{hij}^{2}{(t_{1})}}}}}}},} & (25)\end{matrix}$ where x_(1i)(t₁) is ith input of the high-level FNN at t₁,w_(hj)(t₁) is connection weight between jth neuron in a rule layer andan output neuron at t₁, j∈[1, 8], c_(hij)(t₁) is a center value of jthradial basal neuron corresponding to ith input neuron at t₁, i∈[1, 6],σ_(hij)(t₁) is a center width of the ith input neuron corresponding tothe jth radial basal neuron at t₁, e=2.72, parameter update rules are asfollows:w _(hj)(t ₁+1)=w _(hj)(t ₁)−0.2∂E ₁(t ₁)/∂w _(hj)(t ₁),c _(hij)(t ₁+1)=c _(hij)(t ₁)−0.2∂E ₁(t ₁)/∂c _(hij)(t ₁),σ_(hij)(t _(i)+1)=σ_(hij)(t ₁)−0.2∂E ₁(t ₁)/∂σ_(hij)(t ₁),  (26) wherew_(hj)(t₁+1) is a connection weight between the jth neuron in the rulelayer and the output neuron at t₁+1, c_(hij)(t₁+1) is the center valueof the jth radial basal neuron corresponding to the ith input neuron att₁+1, σ_(hij)(t₁+1) is the center width of the ith input neuroncorresponding to the jth radial basal neuron at t₁+1,E₁(t₁)=½[y₁(t₁)−ŷ₁(t₁)]² is an error between an actual and a predictednitrate nitrogen concentration at t₁; 3) set q=q+1, if q≤20 is true, goto step 2), otherwise, exit the cycle; (4) the low-level FNN is designedto predict DO concentration at each sampling time t₂, which is asfollows: I set r=1; II an input of the low-level FNN is x₂(t₂)=[y₂(t₂),u₂₁(t₂), u₂₂(t₂)]^(T), y₂(t₂)=[y₂(t₂−1), y₂(t₂−2)], u₂₁(t₂)=[u₂₁(t₂−5),u₂₁(t₂−6)], u₂₂(t₂)=[u₂₂(t₂−5), u₂₂(t₂−6)], y₂(t₂−1) is an actual valueof DO concentration at t₂−1, y₂(t₂−2) is an actual value of DOconcentration at t₂−2, an output of the low-level FNN if the predictedvalue of DO concentration ŷ₂(t₂) at t₂, an output expression is asfollows: $\begin{matrix}{{{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)} = \frac{\sum_{j = 1}^{8}{{w_{lj}\left( t_{2} \right)}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{2i}{(t_{2})}} - {c_{lij}{(t_{2})}}})}^{2}}{2{\sigma_{lij}^{2}{(t_{2})}}}}}}}{\sum_{j = 1}^{8}e^{- {\underset{i = 1}{\overset{6}{\sum\limits^{\;}}}\frac{{({{x_{2i}{(t_{2})}} - {c_{lij}{(t_{2})}}})}^{2}}{2{\sigma_{lij}^{2}{(t_{2})}}}}}}},} & (27)\end{matrix}$ where x_(2i)(t₂) is ith input of the low-level FNN at t₂,w_(lj)(t₂) is a connection weight between the jth neuron in the rulelayer and the output neuron at t₂, j∈[1, 8], c_(lij)(t₂) is the centervalue of the jth radial basal neuron corresponding to the ith inputneuron at t₂, i∈[1, 6], σ_(lij)(t₂) is the center width of the ith inputneuron corresponding to the jth radial basal neuron at t₂, parameterupdate rules are as follows:w _(lj)(t ₂+1)=w _(li)(t ₂)−0.2∂E ₂(t ₂)/∂w _(lj)(t ₂),c _(lij)(t ₂+1)=c _(lij)(t ₂)−0.2∂E ₂(t ₂)/∂c _(lij)(t ₂),σ_(hj)(t ₂+1)=σ_(hj)(t ₂)−0.2∂E ₂(t ₂)/σ_(hj)(t ₂),  (28) wherew_(lj)(t₂+1) is the connection weight between the jth neuron in the rulelayer and the output neuron at t₂+1, c_(lij)(t₂+1) is the center valueof the jth radial basal neuron corresponding to the ith input neuron att₂+1, σ_(lij)(t₂+1) is the center width of the ith input neuroncorresponding to the jth radial basal neuron at t₂+1,E₂(t₂)=¼[y₂(t₂)−ŷ₂(t₂)]², is the error between the actual and predictedDO concentration at t₂; III set r=r+1, if r≤20 is true, go to step II,otherwise, exit the cycle; (5) an optimization control module of HMPCmodule is designed as follows: {circle around (1)} set k=0, m=0; {circlearound (2)} according to Eq.(1) and Eq.(3), the outputs of thehigh-level FNN ŷ₁(t₁) and the low-level FNN ŷ₂(t₂) are calculatedrespectively, ŷ₁(t₁)=[ŷ₁(t₁+1), ŷ₁(t₁+2), . . . , ŷ₁(t₁+5)]^(T),ŷ₂(t₂)=ŷ₂(t₂+1), ŷ₂(t₂+2), . . . , ŷ₂(t₂+5)]^(T), ŷ₁(t₁+1) is thepredicted value of nitrate nitrogen concentration at t₁+1, ŷ₁(t₁+2) isthe predicted value of nitrate nitrogen concentration at t₁+2, ŷ₁(t₁+5)is the predicted value of nitrate nitrogen concentration at t₁+5,ŷ₂(t₂+1) is the predicted value of DO concentration at t₂+1, ŷ₂(t₂+2) isthe predicted value of DO concentration at t₂+2, ŷ₂(t₂+5) is thepredicted value of DO concentration at t₂+5; {circle around (3)} anobjective function of high-level MPC is designed to track the set valueof nitrate nitrogen concentration and DO concentration, and thehigh-level law at t₁ is calculated:J ₁(t ₁)=λ₁[α₁ e _(p1)(t ₁)_(T) e _(p1)(t ₁)+ρ₁ Δu ₁(t ₁)^(T) Δu ₁(t₁)]+λ₂[α₂ e _(p2)(t ₂)^(T) e _(p2)(t ₂)+ρ₂ Δu ₁(t ₁)^(T) Δu ₁(t ₁)],  (29) where e_(p1)(t₁)=r₁(t₁)−ŷ₁(t₁) is an error vector between the setvalue of nitrate nitrogen concentration at t₁ and the predicted value ofnitrate nitrogen concentration, e_(p1)(t₁)=[e_(p1)(t₁+1), e_(p1)(t₁+2),. . . , e_(p1)(t₁+5)]^(T), r₁(t₁)=[r₁(t₁+1), r₁(t₁+2), . . . ,r₁(t₁+5)]^(T), e_(p1)(t₁+1) is the error between the set value ofnitrate nitrogen concentration and the predicted value of nitratenitrogen concentration at t₁+1, e_(p1)(t₁+2) is the error between theset value of nitrate nitrogen concentration and the predicted value ofnitrate nitrogen concentration at t₁+2, e_(p1)(t₁+5) is the errorbetween the set value of nitrate nitrogen concentration and thepredicted value of nitrate nitrogen concentration at t₁+5, r₁(t₁+1) isthe set value of nitrate nitrogen concentration at t₁+1, r₁(t₁+2) is theset value of nitrate nitrogen concentration at t₁+2, r₁(t₁+5) is the setvalue of nitrate nitrogen concentration at t₁+5,e_(p2)(t₂)=r₂(t₂)−ŷ₂(t₂) is the error vector between the set value of DOconcentration at t₂ and the predicted value of DO concentration,e_(p2)(t₂)=[e_(p2)(t₂+1), e_(p2)(t₂+2), . . . , e_(p2)(t₂+5)]^(T),r₂(t₂)=[r₂(t₂+1), r₂(t₂+2), . . . , r₂(t₂+5)]^(T), e_(p2)(t₂+1) is theerror between the set value of DO concentration and the predicted valueof DO concentration at t₂+1, e_(p2)(t₂+2) is the error between the setvalue of DO concentration and the predicted value of DO concentration att₂+2, e_(p2)(t₂+5) is the error between the set value of DOconcentration and the predicted value of DO concentration at t₂+5,r₂(t₂+1) is the set value of DO concentration at t₂+1, r₂(t₂+2) is theset value of DO concentration at t₂+2, r₂(t₂+5) is the set value of DOconcentration at t₂+5, Δu₁(t₁)=[Δu₁₁(t₁), Δu₁₁(t₁)]^(T) is the controlvector adjustment amount at t₁, Δu₁₁(t₁) is the adjustment amount ofblower aeration at t₁, Δu₁₂(t₁) is the adjustment amount of internalreflux at t₁, λ₁=0.5, λ₂=0.5 are weight parameters, α₁=30, ρ₁=10,α₂=0.5, ρ₂=0.5 are control parameters, whereΔu ₁(t ₁)=u ₁(t ₁+1)−u ₁(t ₁),|Δu ₁(t ₁)|≤Δu _(max),  (30) u₁(t₁)=[u₁₁(t₁), u₁₂(t₁)]^(T) is thecontrol vector at t₁, u₁₁(t₁) is the aeration rate of the blower at t₁,u₁₂(t₁) is the internal reflux at t₁, u₁(t₁+1)=[u₁₁(t₁+1),u₁₂(t₁+1)]^(T) is the control vector at t₁+1, u₁₁(t₁+1) is the aerationrate of the blower at t₁+1, u₁₂(t₁+1) is the internal reflux flow att₁+1, Δu_(max)=[ΔK_(L)a_(max), ΔQ_(amax)]^(T) is the maximum adjustmentvector allowed by the controller, ΔK_(L)a_(max) is the maximum aerationadjustment amount, ΔQ_(amax) is the maximum internal reflux adjustmentamount, Δu_(max) is set through the blower and internal reflux valve inthe control system equipment; an aeration rate and internal refluxadjustment vector of the high-level MPC are calculated by minimizingEq.(5): $\begin{matrix}{{{\Delta{u_{1}\left( t_{1} \right)}} = {\eta_{1}\left( {{{\xi_{1}\left( \frac{\partial{{\overset{\hat{}}{y}}_{1}\left( t_{1} \right)}}{\partial{u_{1}\left( t_{1} \right)}} \right)}^{T}{e_{p1}\left( t_{1} \right)}} + {{\xi_{2}\left( \frac{\partial{{\overset{\hat{}}{y}}_{2}\left( t_{2} \right)}}{\partial{u_{1}\left( t_{1} \right)}} \right)}^{T}{e_{p2}\left( t_{2} \right)}}} \right)}},} & (31)\end{matrix}$ where η₁=0.8, ξ₁=3, ξ₂=1 are control parameters to adjustthe aeration rate and internal reflux at t₁:u ₁(t ₁+1)=u ₁(t ₁)+Δu ₁(t ₁),  (32) {circle around (4)} an objectivefunction of the low-level MPC is designed to track the concentration ofDO and the control law calculated by the high-level controller, and thelow-level control law is calculated at t₂;J ₂(t ₂)=γ₁ e _(p2)(t ₂)²+γ₂[u ₂₂(t ₂)−u ₁₂(t ₁)]²+γ₃ Δu ₂(t ₂)^(T) Δu₂(t ₂),  (33) where u₂₂(t₂) is an internal reflux of the low-level MPCat t₂, u₁₂(t₁) is an internal reflux calculated by the high-levelcontroller at t₁, Δu₂(t₂)=[Δu₂₁(t₂), Δu₂₂(t₂)]^(T) is a control vectoradjustment amount at t₂, Δu₂₁(t₂) is a blower aeration adjustment amountat t₂, Δu₂₂(t₂) is an internal reflux adjustment amount at t₂, γ₁=30,γ₂=10, γ₃=1 are control parameters, whereΔu ₂(t ₂)=u ₂(t ₂+1)−u ₂(t ₂),|Δu ₂(t ₂)|≤Δu _(max),  (34) where u₂(t₂)=[u₂₁(t₂), u₂₂(t₂)]^(T) is thecontrol vector at t₂, u₂₁(t₂) is the aeration rate of the blower at t₂,u₂₂(t₂) is the internal reflux flow at t₂, u₂(t₂+1)=[u₂₁(t₂+1),u₂₂(t₂+1)]^(T) is the control vector at t₂+1, u₂₁(t₂+1) is the aerationrate of the blower at t₂+1, u₂₁(t₂+1) is the internal reflux flow att₂+1; the aeration rate and internal reflux adjustment vector of thelow-level MPC are calculated by minimizing Eq.(9): $\begin{matrix}{{{\Delta{u_{2}\left( t_{2} \right)}} = {\eta_{2}\left\lbrack {{{\gamma_{1}\left( \frac{\partial{{\hat{y}}_{2}\left( t_{2} \right)}}{\partial{u_{2}\left( t_{2} \right)}} \right)}^{T}{e_{p2}\left( t_{2} \right)}} - {{\gamma_{2}\left( \frac{\partial{u_{22}\left( t_{2} \right)}}{\partial{u_{2}\left( t_{2} \right)}} \right)}^{T}\left( {{u_{22}\left( t_{2} \right)} - {u_{12}\left( t_{1} \right)}} \right)}} \right\rbrack}},} & (35)\end{matrix}$ where η₂=8.4 is control parameter to adjust the aerationrate and internal reflux at t₂:u ₂(t ₂+1)=u ₂(t ₂)+Δu ₂(t ₂),  (36) {circle around (5)} set k=k+1, ifk=2(m+1) is true, set m=m+1 and go to step {circle around (2)},otherwise, go to step {circle around (6)}; {circle around (6)} if k≤200is true, calculate the output of the low-level FNN ŷ₂(t₂)=ŷ₂(t₂+1),ŷ₂(t₂+2), . . . , ŷ₂(t₂+5)]^(T) by Eq.(3), and go to step {circle around(4)}, otherwise, end the cycle; (6) the concentration of nitratenitrogen and DO is controlled by u₂(t₂) solved by the low-levelcontroller, u₂(t₂)=[u₂₁(t₂), u₂₂(t₂)]^(T) is an input of a inverter anda sensor at t₂, the inverter controls the blower by adjusting a speed ofa motor, and the sensor controls a valve by adjusting opening of aninstrument, then, the aeration rate and internal reflux are controlled,the output of the system is the actual value of nitrate nitrogenconcentration and DO concentration.